<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>

      #d1{
          width: 200px;
          height: 200px;
          background-color: red;

          overflow: hidden;/*解决粘连问题*/
      }

      #d1>div{
          width: 50px;
          height: 50px;
          background-color: #0aa1ed;
          /*当元素的上边缘与上级元素的边缘重合时,给元素添加上边距时会出现粘连问题*/
          margin-left: 50px;
          margin-top: 100px;
      }
    #d2{
      width: 100px;
      height: 100px;
      border: 2px solid red;
      /*border-bottom: deeppink;可以单一方向设置边框*/
        border-radius: 30px;
    }
    #d3{
      width: 50px;
      height: 50px;
      border: 1px solid blue;
/*给元素添加内边距会影响元素的宽高*/
      padding-left: 500px;
      padding-top: 50px;
    }
  </style>
</head>
<body>
<div id="d3">内边距</div>
<div id="d2">边框测试</div>
<div id="d1">
  <div></div>
</div>
</body>
</html>